<!doctype html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>统计图表-WeAdmin Frame型后台管理系统-WeAdmin 1.0</title>
  <meta name="renderer" content="webkit|ie-comp|ie-stand">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
  <meta http-equiv="Cache-Control" content="no-siteapp" />
  <link rel="stylesheet" href="../../static/css/font.css">
  <link rel="stylesheet" href="../../static/css/weadmin.css">
  <script type="text/javascript" src="../../lib/layui/layui.js" charset="utf-8"></script>
</head>
<body>
<div class="weadmin-body">
  <!-- 为 ECharts 准备一个具备大小（宽高）的 DOM -->
  <div id="main" style="width:100%;height:300px;display:flex;align-items:center;">
  </div>
  <div id="content" style="width: 100%;height:600px;display:flex;align-items:center;justify-content:space-around">
    <h2>积极情感词汇</h2><img src="pos.png" width="45%"/>
    <h2>消极情感词汇</h2><img src="neg.png" width="45%"/>
  </div>
</div>
<script src="//cdn.bootcss.com/echarts/4.0.2/echarts.min.js"></script>
<script type="text/javascript">
  var chart = echarts.init(document.getElementById("main"));
  var option = {
    tooltip:{
      trigger:'item'
    },
    legend:{
      top:'5%',
      left:'center'
    },
    series:[
    {
      name:'评论统计',
      type:'pie',
      radius:['40%','70%'],
      avoidLabelOverlap: false,
      itemStyle:{
        borderRadius: 10,
        borderColor:'#fff',
        borderWidth:2
      },
      label: {
        show:false,
        position:'center'
      },
      emphasis: {
        label:{
          show:true,
          fontSize:40,
          fontWeight:'bold'
        }
      },
      labelLine:{
        show: false
      },
      data: [
        {value:10927,name:'积极评论'},
        {value:2045,name:'消极评论'}
      ]
      }
    ],
  };

  chart.setOption(option);
</script>
</body>
</html>